//入口文件
import Vue from 'vue';
//导入vue的路由
import VueRouter from 'vue-router';

//安装路由
Vue.use(VueRouter);

//引入时间的插件
import moment from 'moment';
//定义一个全局过滤器
Vue.filter('dateFormat',function (dataStr,pattern="YYYY-MM-DD HH:mm:ss") {
    //
    return moment(dataStr).format(pattern);
})




// 按需导入mint-ui
import { Header,Swipe, SwipeItem ,Button } from 'mint-ui';
//注入组件
Vue.component(Header.name, Header);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);
//导入mui
import './lib/css/mui.css'
import './lib/css/icons-extra.css'
import './lib/css/app.css'
import app from './App.vue'
//导入自己的router.js路由模块vue-resource
import router from './router.js'
//2.2安裝vue-resource
import VueResource from 'vue-resource'
Vue.use(VueResource)
var vm  = new Vue({
    el:'#app',
    data:{

    },
    render: c=> c(app),
    router//挂在路由对象到vm实例上
});